module.exports = app => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;
    const VersionSchema = new Schema({
        tenantId: {
            type: String,
            required: true
        }, // 租户目录ID
        version: {
            type: String,
            required: true
        }, // 版本
        status: {
            type: Number,
            default: 0,
            enum: [0, 1]
        },
        folderName: String,
        siteId: Schema.Types.ObjectId,
        type: {
            type: Number,
            default: 5,
            enum: [1, 2, 3, 4, 5, 6]
        }, // 1 APP 2:微信 3:企业微信 4: 钉钉 5:内嵌 6: PC
    }, { timestamps: { createdAt: 'createDate', updatedAt: 'updateDate' } });
    return mongoose.model('Version', VersionSchema);
}